package factory.factoryMethod;

import factory.bean.Car;
import factory.bean.Vehicle;

import java.math.BigDecimal;

/**
 * 汽车工厂
 */
public class CarFactory extends VehicleFactoryMethod {

    @Override
    public Vehicle create() {
        return new Car(new BigDecimal("299"), "大众");
    }

    public static Vehicle createCar(){
        return new CarFactory().create();
    }
}
